<?php

namespace App\Enums;

final class ParamsEnums
{

    private static $item = [
        'constellation' => [
            1 => '水瓶座',
            2 => '双鱼座',
            3 => '白羊座',
            4 => '金牛座',
            5 => '双子座',
            6 => '巨蟹座',
            7 => '狮子座',
            8 => '处女座',
            9 => '天秤座',
            10 => '天蝎座',
            11 => '射手座',
            12 => '摩羯座'
        ],
        'zodiac' => [
            1 => '鼠',
            2 => '牛',
            3 => '虎',
            4 => '兔',
            5 => '龙',
            6 => '蛇',
            7 => '马',
            8 => '羊',
            9 => '猴',
            10 => '鸡',
            11 => '狗',
            12 => '猪'
        ],
        'education' => [
            1 => '中专以下',
            2 => '中专',
            3 => '大专',
            4 => '本科',
            5 => '硕士',
            6 => '博士'
        ],
        'marry' => [
            1 => '未婚',
            2 => '离异未育',
            3 => '离异单身',
            4 => '离异带孩',
            5 => '丧偶'
        ],
        'car' => [
            1 => '未购车',
            2 => '持币待购',
            3 => '已购车',
            4 => '已购多辆'
        ],
        'house' => [
            1 => '暂未购房',
            2 => '持币待购',
            3 => '已购住房',
            4 => '多套住房',
            5 => '自建房'
        ],
        'job' => [
            1 => '央企',
            2 => '国企',
            3 => '教师',
            4 => '医生',
            5 => '护士',
            6 => '私企老板',
            7 => '金融',
            8 => '事业编',
            9 => '军人',
            10 => '运动员',
            11 => '总经理',
            12 => '高级干部',
            13 => '公务员',
            14 => '律师',
            15 => '部门经理',
            16 => '中层管理',
            17 => '总监',
            18 => '工程师',
            19 => '设计师',
            20 => '艺术家',
            21 => '演员',
            22 => '模特',
            23 => '离/退休',
            24 => '技术员',
            25 => '服务员',
            26 => '普通员工',
            27 => '自由职业',
            28 => '无业'
        ],
        'salary' => [
            1 => '5万以下',
            2 => '5-10万',
            3 => '10-30万',
            4 => '30万以上'
        ],
        'spend' => [
            1 => '2千元以下',
            2 => '2-4千元',
            3 => '4-6千元',
            4 => '6-8千元',
            5 => '8千-1万元',
            6 => '1-2万元',
            7 => '2-5万元',
            8 => '5万元以上'
        ],
        'gender' => [
            1 => '男',
            2 => '女',
            3 => '未知'
        ],
        'interest' => [
            1 => '运动',
            2 => '购物',
            3 => '美食',
            4 => '旅行',
            5 => '读书',
            6 => '聚会',
            7 => '投资',
            8 => '收藏',
            9 => '宠物',
            10 => '摄影',
            11 => '电竞',
            12 => '动漫',
            13 => '电影',
            14 => '咖啡',
            15 => '唱歌',
            16 => '穿搭'
        ],
        'child' => [
            1 => '没有',
            2 => '有,和我住一起',
            3 => '有,有时和我住一起',
            4 => '有，不和我住一起'
        ],
        'blood' => [
            1 => 'A型',
            2 => 'B型',
            3 => 'O型',
            4 => 'AB型',
            5 => '其他'
        ],
        'national' => [
            1 => '汉族',
            2 => '藏族',
            3 => '朝鲜族',
            4 => '蒙古族',
            5 => '回族',
            6 => '满族',
            7 => '维吾尔族',
            8 => '壮族',
            9 => '彝族',
            10 => '苗族',
            11 => '其他民族'
        ],
        'companytype' => [
            1 => '政府机关',
            2 => '事业单位',
            3 => '外企企业',
            4 => '世界500强',
            5 => '上市公司',
            6 => '国有企业',
            7 => '私营企业',
            8 => '自有公司'
        ],
        'workstatus' => [
            1 => '轻松稳定',
            2 => '朝九晚五',
            3 => '偶尔加班',
            4 => '经常加班',
            5 => '偶尔出差',
            6 => '经常出差',
            7 => '经常有应酬',
            8 => '经常有应酬'
        ],
        'smoking' => [
            1 => '不吸，很反感',
            2 => '不吸烟，但不反感',
            3 => '偶尔吸烟',
            4 => '习惯吸烟',
            5 => '烟不离手',
            6 => '抽烟可戒'
        ],
        'drinking' => [
            1 => '不喝酒',
            2 => '偶尔喝',
            3 => '社交需要喝',
            4 => '兴致时小酌',
            5 => '酒不离口'
        ],
        'liveparent' => [
            1 => '愿意',
            2 => '不愿意',
            3 => '视情况而定'
        ],
        'wantchild' => [
            1 => '愿意',
            2 => '不愿意',
            3 => '视情况而定'
        ],
        'familyback' => [
            1 => '高知',
            2 => '高干',
            3 => '经商',
            4 => '中产阶级',
            5 => '小康',
            6 => '工薪阶层',
            7 => '其他'
        ],
        'condcar' => [
            1 => '无需',
            2 => '必需'
        ],
        'wedtime' => [
            1 => '及时闪婚',
            2 => '一年以内',
            3 => '两年以内',
            4 => '三年以内',
            5 => '时机成熟时就结婚'
        ],
        'focus' => [
            1 => '性格与心灵',
            2 => '容貌身材',
            3 => '经济实力',
            4 => '教育程度',
            5 => '身体素质'
        ],
        'wedding' => [
            1 => '顶级酒店，高朋满座',
            2 => '户外婚礼，温馨浪漫',
            3 => '旅游结婚，不大操大办',
            4 => '中式婚礼，宴请宾客',
            5 => '简单随性，无所谓'
        ],
        'cooking' => [
            1 => '色香味俱全',
            2 => '能做几样可口的小菜',
            3 => '不太会，但愿为心爱的人学习'
        ],
        'housework' => [
            1 => '任劳任怨',
            2 => '希望对方承担家务',
            3 => '一起分工合作',
            4 => '看各自闲忙，协商分担'
        ],
        'allopatry' => [
            1 => '接受',
            2 => '不接受',
            3 => '看情况'
        ],
        'parentstatus' => [
            1 => '父母健在',
            2 => '单亲家庭',
            3 => '父亲健在',
            4 => '母亲健在',
            5 => '父母均离世'
        ],
        'olderbrother' => [
            1 => '没有',
            2 => '1个',
            3 => '2个',
            4 => '3个',
            5 => '4个',
            6 => '5个',
            7 => '6个',
            8 => '7个',
            9 => '8个',
            10 => '9个'
        ],
        'youngerbrother' => [
            1 => '没有',
            2 => '1个',
            3 => '2个',
            4 => '3个',
            5 => '4个',
            6 => '5个',
            7 => '6个',
            8 => '7个',
            9 => '8个',
            10 => '9个'
        ],
        'oldersister' => [
            1 => '没有',
            2 => '1个',
            3 => '2个',
            4 => '3个',
            5 => '4个',
            6 => '5个',
            7 => '6个',
            8 => '7个',
            9 => '8个',
            10 => '9个'
        ],
        'youngersister' => [
            1 => '没有',
            2 => '1个',
            3 => '2个',
            4 => '3个',
            5 => '4个',
            6 => '5个',
            7 => '6个',
            8 => '7个',
            9 => '8个',
            10 => '9个'
        ],
        'fatherwork' => [
            1 => '政府机关（已退休）',
            2 => '政府机关（未退休）',
            3 => '事业单位（已退休）',
            4 => '事业单位（未退休）',
            5 => '外企单位（已退休）',
            6 => '外企单位（未退休）',
            7 => '世界500强公司（已退休）',
            8 => '世界500强公司（未退休）',
            9 => '上市公司（已退休）',
            10 => '上市公司（未退休）',
            11 => '国有企业（已退休）',
            12 => '国有企业（未退休）',
            13 => '私营企业（已退休）',
            14 => '私营企业（未退休）',
            15 => '其他（已退休）',
            16 => '其他（未退休）',
            17 => '无工作）'
        ],
        'motherwork' => [
            1 => '政府机关（已退休）',
            2 => '政府机关（未退休）',
            3 => '事业单位（已退休）',
            4 => '事业单位（未退休）',
            5 => '外企单位（已退休）',
            6 => '外企单位（未退休）',
            7 => '世界500强公司（已退休）',
            8 => '世界500强公司（未退休）',
            9 => '上市公司（已退休）',
            10 => '上市公司（未退休）',
            11 => '国有企业（已退休）',
            12 => '国有企业（未退休）',
            13 => '私营企业（已退休）',
            14 => '私营企业（未退休）',
            15 => '其他（已退休）',
            16 => '其他（未退休）',
            17 => '无工作）'
        ],
        'parenteconomic' => [
            1 => '均有退休金',
            2 => '只有父亲有退休金',
            3 => '只有母亲有退休金',
            4 => '均有养老保险',
            5 => '只有父亲有养老保险',
            6 => '只有母亲有养老保险',
            7 => '均无养老保障'
        ],
        'parentshealthcare' => [
            1 => '均有医疗保险',
            2 => '均无医疗保险',
            3 => '只有父亲有医疗保险',
            4 => '只有母亲有医疗保险'
        ],
        'health' => [
            1 => '健康',
            2 => '慢性病',
            3 => '伤残'
        ],
        'sin' => [
            1 => '有',
            2 => '无'
        ],
        'debt' => [
            1 => '有',
            2 => '无'
        ],
        'tophome' => [
            1 => '独生子女',
            2 => '老大',
            3 => '老二',
            4 => '老三',
            5 => '老四',
            6 => '老五',
            7 => '其他'
        ],
        'sourcefrom' => [
            1 => '小红书',
            2 => '抖音',
            3 => '陌陌',
            4 => '微信群',
            5 => 'QQ群',
            6 => '百度',
            7 => '微博',
            8 => '朋友推荐',
            9 => '其他'
        ],
        'intention' => [
            1 => 'A类-未接',
            2 => 'B类-初步沟通',
            3 => 'C类-深入沟通',
            4 => 'D类-待确认到店时间',
            5 => 'E类-已确定到店时间',
            6 => 'F类-毁约需再约',
            7 => 'G类-已到店未签约'
        ],
        'droptype' => [
            1 => '系统投放',
            2 => '主动放弃'
        ],
        'dropreason' => [
            1 => '未知',
            2 => '空号',
            3 => '多次无人接听/关机',
            4 => '多次秒挂',
            5 => '不是单身',
            6 => '疑虑无法解决',
            7 => '有心理或生理缺陷',
            8 => '同行服务期中',
            9 => '对服务模式不认可',
            10 => '不在本地',
            11 => '无购买力',
            12 => '已婚',
            13 => '其他'
        ],
        'personality' => [
            1 => '浪漫迷人',
            2 => '成熟稳重',
            3 => '风趣幽默',
            4 => '乐天达观',
            5 => '活泼可爱',
            6 => '忠厚老实',
            7 => '淳朴害羞',
            8 => '温柔体贴',
            9 => '多愁善感',
            10 => '新潮时尚',
            11 => '热辣动感',
            12 => '豪放不羁'
        ],
        'blacktype' => [
            1 => '照片不实',
            2 => '资料虚假',
            3 => '找第三者',
            4 => '攻击诽谤',
            5 => '言语不雅',
            6 => '有骚扰行为',
            7 => '有做托行为',
            8 => '有诈骗行为',
            9 => '有广告行为',
            10 => '有活动违规'
        ],
    ];

    public static function getSingleItemValue($code)
    {
        return isset(self::$item[$code]) ? self::$item[$code] : [];
    }

    public static function getAllItemValue()
    {
        return self::$item;
    }

    public static function turnFormat($row)
    {
        $itemsValue = self::$item;
        //婚况->转换文本格式
        if (property_exists($row, 'marry')) {
            $marryArray = explode(',', $row->marry);
            $marryTextArray = array_map(function($value) use ($itemsValue) {
                return isset($itemsValue['marry'][$value]) ? $itemsValue['marry'][$value] : '不限';
            }, $marryArray);
            $row->marryText = implode(',', $marryTextArray);
        }

        //学历->转换文本格式
        if (property_exists($row, 'education')) {
            $educationArray = explode(',', $row->education);
            $educationTextArray = array_map(function($value) use ($itemsValue) {
                return isset($itemsValue['education'][$value]) ? $itemsValue['education'][$value] : '不限';
            }, $educationArray);
            $row->educationText = implode(',', $educationTextArray);
        }

        //工作->转换文本格式
        if (property_exists($row, 'job')) {
            $jobArray = explode(',', $row->job);
            $jobTextArray = array_map(function($value) use ($itemsValue) {
                return isset($itemsValue['job'][$value]) ? $itemsValue['job'][$value] : '不限';
            }, $jobArray);
            $row->jobText = implode(',', $jobTextArray);
        }

        //收入->转换文本格式
        if (property_exists($row, 'salary')) {
            $salaryArray = explode(',', $row->salary);
            $salaryTextArray = array_map(function($value) use ($itemsValue) {
                return isset($itemsValue['salary'][$value]) ? $itemsValue['salary'][$value] : '不限';
            }, $salaryArray);
            $row->salaryText = implode(',', $salaryTextArray);
        }

        //汽车->转换文本格式
        if (property_exists($row, 'car')) {
            $carArray = explode(',', $row->car);
            $carTextArray = array_map(function($value) use ($itemsValue) {
                return isset($itemsValue['car'][$value]) ? $itemsValue['car'][$value] : '不限';
            }, $carArray);
            $row->carText = implode(',', $carTextArray);
        }

        //房子->转换文本格式
        if (property_exists($row, 'house')) {
            $houseArray = explode(',', $row->house);
            $houseTextArray = array_map(function($value) use ($itemsValue) {
                return isset($itemsValue['house'][$value]) ? $itemsValue['house'][$value] : '不限';
            }, $houseArray);
            $row->houseText = implode(',', $houseTextArray);
        }
        //孩子->转换文本格式
        if (property_exists($row, 'child')) {

            $childArray = explode(',', $row->child);
            $childTextArray = array_map(function($value) use ($itemsValue) {
                return isset($itemsValue['child'][$value]) ? $itemsValue['child'][$value] : '不限';
            }, $childArray);
            $row->childText = implode(',', $childTextArray);
        }
        //吸烟->转换文本格式
        if (property_exists($row, 'smoking')) {
            $smokingArray = explode(',', $row->smoking);
            $smokingTextArray = array_map(function($value) use ($itemsValue) {
                return isset($itemsValue['smoking'][$value]) ? $itemsValue['smoking'][$value] : '不限';
            }, $smokingArray);
            $row->smokingText = implode(',', $smokingTextArray);
        }

        //喝酒->转换文本格式
        if (property_exists($row, 'drinking')) {
            $drinkingArray = explode(',', $row->drinking);
            $drinkingTextArray = array_map(function($value) use ($itemsValue) {
                return isset($itemsValue['drinking'][$value]) ? $itemsValue['drinking'][$value] : '不限';
            }, $drinkingArray);
            $row->drinkingText = implode(',', $drinkingTextArray);
        }

        //生肖->转换文本格式
        if (property_exists($row, 'zodiac')) {
            $zodiacArray = explode(',', $row->zodiac);
            $zodiacTextArray = array_map(function($value) use ($itemsValue) {
                return isset($itemsValue['zodiac'][$value]) ? $itemsValue['zodiac'][$value] : '不限';
            }, $zodiacArray);
            $row->zodiacText = implode(',', $zodiacTextArray);
        }

        //星座->转换文本格式
        if (property_exists($row, 'constellation')) {
            $constellationArray = explode(',', $row->constellation);
            $constellationTextArray = array_map(function($value) use ($itemsValue) {
                return isset($itemsValue['constellation'][$value]) ? $itemsValue['constellation'][$value] : '不限';
            }, $constellationArray);
            $row->constellationText = implode(',', $constellationTextArray);
        }

    }
}
